package com.company.cloud.company.modules.api.service;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.company.modules.api.fallback.CompanyConfigRemoteServiceFallbackFactory;
import com.company.cloud.company.modules.api.request.ThirdPlatformConfigGetRequest;
import com.company.cloud.company.modules.api.request.ThirdPlatformValidateContentRequest;
import com.company.cloud.company.modules.api.response.*;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "companyConfig", name = ServiceNameConstant.user_center, fallbackFactory = CompanyConfigRemoteServiceFallbackFactory.class)
public interface CompanyConfigRemoteService {

    /**
     * 公司分佣基础配置
     */
    @RequestMapping(value = "/remote/user/baseProfitConfig", method = RequestMethod.GET)
    public BaseClientResult<BaseProfitConfigResp> getBaseProfitConfig(@RequestParam("companyNo") String companyNo);

    /**
     * 公司提现配置信息
     */
    @RequestMapping(value = "/remote/user/cashConfig", method = RequestMethod.GET)
    public BaseClientResult<CashConfigResp> getCashConfig(@RequestParam("companyNo") String companyNo);

    /**
     * 公司获客奖励配置信息
     */
    @RequestMapping(value = "/remote/user/customerReward", method = RequestMethod.GET)
    public BaseClientResult<CustomerRewardResp> getCustomerReward(@RequestParam("companyNo") String companyNo);

    /**
     * 三方平台配置信息
     */
    @RequestMapping(value = "/remote/platform/getThirdPlatformConfig", method = RequestMethod.POST)
    public BaseClientResult<ThirdPlatformConfigModel> getThirdPlatformConfig(@RequestBody ThirdPlatformConfigGetRequest params);

    /**
     * 三方平台AccessToken信息
     */
    @RequestMapping(value = "/remote/platform/getThirdPlatformAccessToken", method = RequestMethod.POST)
    public BaseClientResult<String> getThirdPlatformAccessToken(@RequestBody ThirdPlatformConfigGetRequest params);


    /**
     * 三方平台validateContent
     */
    @RequestMapping(value = "/remote/platform/validateContent", method = RequestMethod.POST)
    public BaseClientResult<ValidateContentResp> validateContent(@RequestBody ThirdPlatformValidateContentRequest params);


}
